<!--
 * @FilePath     : /study_code/jquery/ajax-options-data-get.html
 * @Description  : $.ajax() GET 请求传参
 * @Date         : 2025-04-17 15:46:48
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-17 15:51:28
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <!-- <link rel="stylesheet" href="" /> -->
  </head>
  <body>
    <div id="demo-test">jq基础模板</div>

    <script src="/jquery/dist/jquery.min.js"></script>
    <script src="/jquery/ajax/common.js"></script>
    <script>
      $.ajax({
        url: baseUrl.root + baseUrl.ajax + '/data-get',
        type: 'GET',
        data: {
          id: '1234r12g241',
          name: 'fangyinggui',
        },
        success: function () {
          console.log(1, 'xxx')
        },
      })
      /*
      // 请求后，服务端会 log 该接口下的请求参数
      */

      $.ajax({
        url: baseUrl.root + baseUrl.ajax + '/data-post',
        type: 'POST',
        data: {
          uname: '18715384437',
          pwd: '87494354687',
        },
        success: function () {
          console.log(2, 'xxx')
        },
      })
    </script>
  </body>
</html>
